﻿using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;
using Prism.Services.Dialogs;
using YJTMedicalAideManage.MAM.Controls;
using YJTMedicalAideManage.MAM.ViewModels;
using YJTMedicalAideManage.MAM.Views;

namespace YJTMedicalAideManage.MAM
{
    public class MAMModule : IModule
    {
        private readonly IRegionManager _regionManager;

        public MAMModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {

        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            _regionManager.RegisterViewWithRegion("ContentRegion", typeof(MAMView));
            containerRegistry.RegisterForNavigation<MAMView>(typeof(MAMView).FullName);
            containerRegistry.RegisterDialog<AddOrEditPagesDialog, AddOrEditPagesDialogViewModel>();

        }
    }
}